package com.skyyan.netty.jjf.client.handler;

import com.skyyan.netty.jjf.client.MessageHandler;
import com.skyyan.netty.jjf.protocol.Message;
import com.skyyan.netty.jjf.protocol.RegisterConfirmMessage;

/**
 * 注册确认消息处理器
 */
public class RegisterConfirmMessageHandler implements MessageHandler {
    @Override
    public boolean canHandle(Message msg) {
        return msg instanceof RegisterConfirmMessage;
    }
    
    @Override
    public void handle(Message msg) {
        if (msg instanceof RegisterConfirmMessage.Downlink) {
            System.out.println("注册确认下行报文");
        } else {
            System.out.println("注册确认上行报文");
        }
    }
}